<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ include file="../common/include.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>仓库</title>

<script type="text/javascript">
	$(document).ready(function() {
		$("#pid").click(function() {
			$("#categoryTree").overlay().load();
		});

		$("#categoryTree").overlay({
			// custom top position
			top : 260,

			// some mask tweaks suitable for facebox-looking dialogs
			mask : {
				// you might also consider a "transparent" color for the mask
				color : '#fff',
				// load mask a little faster
				loadSpeed : 200,
				// very transparent
				opacity : 0.5
			},
			// disable this for modal dialog-type of overlays
			closeOnClick : false,
			// load it immediately after the construction
			load : false
		});
		//jQuery("#warehouse").validate();
	});
	
	function f_treeDblClick(node){
		$("#pid").attr("value",node.attr("id"));
		$("#pname").text($('span:first',node).text());
	}
	function f_afterClick(node){
		//alert(node.attr("name"));
	}
</script>
 
</head>
<body>
<div>${msg }</div>
<jsp:include page="box/categorylist.jsp"></jsp:include>
<form:form commandName="category">
<table>
<thead>
</thead>
<tbody>
<tr><td>所属父类</td><td>
<form:input path="pid" readonly="true"/><span id="pname" ></span>
</td>
</tr>
<tr><td>名称</td><td>
<form:input path="name"/><form:errors class="error" path="name" />
</td>
</tr>
<tr><td>编码</td><td><form:input path="code"/>  <form:errors class="error" path="code" /> </td>
</tr>
<tr><td>拼音</td><td><form:input path="pinyin"/> <form:errors class="error" path="pinyin" /></td>
</tr>
<tr><td>备注</td><td><form:input path="note" />  <form:errors class="error" path="note" /> </td>
</tr>
<tr><td><button type="submit">提交</button>  </td>
</tr>
</tbody>
</table>
</form:form>


</body>
</html>